package com.lianxi.util;

import java.util.ResourceBundle;

/**
 * 配置文件读取
 */
public class ResourcesUtils {

    private static final ResourceBundle CONFIG_ = ResourceBundle.getBundle("config");




    private void ResourcesUtils() {}

    public static String getCasServerUrlPrefix() {
        return CONFIG_.getString("casServerUrlPrefix");
    }

    public static String getSsoToken() {
        return CONFIG_.getString("sso_token");
    }


//    public static String  getFTPConfig(){ return CONFIG_.getString("ftp_config"); }

    /**
     * 定时任务相关
     */

    public static String getJobUrl() {
        return CONFIG_.getString("job.addresses");
    }

    public static String getJobAddressIps() {
        return CONFIG_.getString("job.ip");
    }

    public static String getJobAddressPort() {
        return CONFIG_.getString("job.port");
    }

    public static String getClueTime() {
        return CONFIG_.getString("clue_time");
    }

    public static String getUserTimeOut() {
        return CONFIG_.getString("user_time_out");
    }

    public static String getMyTalklist() {
        return CONFIG_.getString("my_tolk_list");
    }

    /**
     * 用户经纬度信息（redis）
     *
     * @return
     */
    public static String getUserLngAndLat() {
        return CONFIG_.getString("user_lng_lat");
    }

    /**
     * 获取半径
     *
     * @return
     */
    public static String getRadius() {
        return CONFIG_.getString("radius");
    }

    public static String getPageLength() {
        return CONFIG_.getString("pageLength");
    }

    public static String yzSMSCode() {
        return CONFIG_.getString("yzsms_code");
    }

    /**
     * 获取推送app key
     */
    public static final String getPushAppKey() {
        return CONFIG_.getString("app_key");
    }

    /**
     * 获取推送master key
     */
    public static final String getPushMasterKey() {
        return CONFIG_.getString("master_key");
    }

    /**
     * redis的ip
     *
     * @return
     */
    public static final String redisip() {
        return CONFIG_.getString("redis.ip");
    }

    /**
     * redis的端口
     *
     * @return
     */
    public static final String reidsport() {
        return CONFIG_.getString("redis.port");
    }

    /**
     * redis的密码
     *
     * @return
     */
    public static final String redispwd() {
        return CONFIG_.getString("redis.pwd");
    }


    /**
     * 获取默认头像
     */
    public static final String getDefaultUserIcon() {
        return CONFIG_.getString("user_icon");
    }

    /**
     * 获取版心的存放路径
     */
    public static final String getLayoutStylePath() {
        return CONFIG_.getString("layout_style_path");
    }

    public static final String getQiniuImgUrl() {
        return CONFIG_.getString("qiniu_img_url");
    }

    public static final String onlyofficeUrl() {
        return CONFIG_.getString("onlyoffice_url");
    }

    /**
     * 图片宽度限制
     */
    public static final String getImgWidth() {
        return CONFIG_.getString("img_width");
    }

    /**
     * 短信发送模式
     *
     * @return
     */
    public static final String smsType() {
        return CONFIG_.getString("sms_type");
    }


    public static final String getAllSearch() {
        return CONFIG_.getString("all_search");
    }

    /**
     * 获得领导批示的权限
     *
     * @return
     */
    public static final String getMeetclueLeader() {
        return CONFIG_.getString("meetClueLeader");
    }

    /**
     * @return 获得线索的权限
     */
    public static final String getMeetClueClue() {
        return CONFIG_.getString("meetClueClue");
    }

    /**
     * 日志总结
     *
     * @return
     */
    public static final String getMeetClueLog() {
        return CONFIG_.getString("meetClueLog");
    }

    public static final String getMeetClueModerator() {
        return CONFIG_.getString("meetClueModerator");
    }

    public static final String getMeetClueNews() {
        return CONFIG_.getString("meetClueNews");
    }

    /**
     * 全站搜索
     *
     * @return
     */
    public static final String getWholeQuery() {
        return CONFIG_.getString("wholeQueryTest");
    }

    /**
     * 大样审阅（查看所有的权限）
     */
    public static final String getBigSample() {
        return CONFIG_.getString("bigsample");
    }

    /**
     * 判断推送的环境
     */
    public static final String isPushTest() {
        return CONFIG_.getString("is_push_test");
    }

    /**
     * 获取天气的参数
     */
    public static final String getWeatherAppKey() {
        return CONFIG_.getString("weather.appkey");
    }

    /**
     * 获取天气的参数
     */
    public static final String getWeatherApi() {
        return CONFIG_.getString("weather.api");
    }


    public static final String getBgImge() {
        return CONFIG_.getString("bg_imge");
    }

    /**
     * 获取天气的参数
     */
    public static final String getNewWeatherApi() {
        return CONFIG_.getString("new.weather.api");
    }

    /**
     * 获取天气的参数
     */
    public static final String getNewWeatherToken() {
        return CONFIG_.getString("new.weather.token");
    }

    /**
     * 共享文档表格
     *
     * @return
     */
    public static final String getEPUrl() {
        return CONFIG_.getString("ep_url");
    }

    /**
     * 共享文档加密key
     *
     * @return
     */
    public static final String getEPKey() {
        return CONFIG_.getString("ep_key");
    }

    /**
     * 共享文档
     *
     * @return
     */
    public static final String getEPadUrl() {
        return CONFIG_.getString("ep_url_pad");
    }

    /**
     * 共享文档key
     *
     * @return
     */
    public static final String getEPadKey() {
        return CONFIG_.getString("ep_key_api");
    }

    /**
     * 共享文档key
     *
     * @return
     */
    public static final String getESUrl() {
        return CONFIG_.getString("es_url");
    }

    /**
     * ============================================OSS============================================
     * 阿里云对象存储 accessKeyId
     */
    public static String ossAccessKeyId() {
        return CONFIG_.getString("access_key_id");
    }

    /**
     * 阿里云对象存储 accessKeySecret
     */
    public static String ossAccessKeySecret() {
        return CONFIG_.getString("access_key_secret");
    }

    /**
     * 阿里云对象存储 endPoint
     */
    public static String ossEndPoint() {
        return CONFIG_.getString("end_point");
    }
    /**
     * 阿里云对象存储 bucketName
     */
    public static String ossBucketName() {
        return CONFIG_.getString("bucket_name");
    }

    public static String ossDomain() {
        return CONFIG_.getString("domain");
    }

    public static String materialRootUrl() {
        return CONFIG_.getString("material_root_url");
    }

    public static String heNanDailyAttachRootUrl() {
        return CONFIG_.getString("henandaily_attach_url");
    }


    /**
     * 阿里云对象存储 映射地址 访问图片使用
     */
    public static String ossCastDomain() {
        return CONFIG_.getString("cast_domain");
    }


    public static String ossCallbackUrl() {
        return CONFIG_.getString("callback_url");
    }

    public static String getUploadFileType() {
        return CONFIG_.getString("upload_file_type");
    }

    public static String getUploadImgType() {
        return CONFIG_.getString("upload_img_type");
    }

    public static String getUploadVideoType() {
        return CONFIG_.getString("upload_video_type");
    }

    public static String getUploadMediaType() {
        return CONFIG_.getString("upload_media_type");
    }

    public static String getUploadFileMaxSize() {
        return CONFIG_.getString("upload_file_max_size");
    }

    public static String getUploadImgMaxSize() {
        return CONFIG_.getString("upload_img_max_size");
    }

    // ########################################### redis 相关 ###########################################

    public static long redisAppId() {
        return Long.parseLong(CONFIG_.getString("redis.appId"));
    }
    public static String redisVersion() {
        return CONFIG_.getString("redis.client.version");
    }

    public static String redisUrlSuffix() {
        return CONFIG_.getString("redis.cluster.suffix");
    }

    public static String dominUrl() {
        return CONFIG_.getString("redis.domin.url");
    }


    // ################################################## zimg 文件上传 ##################################################


    public static String getLimitWidth() {
        return CONFIG_.getString("limit_width");
    }

    public static String getMaterialType() {
        return CONFIG_.getString("material_type");
    }

    public static String getMaterialCache() {
        return CONFIG_.getString("material_cache");
    }

    public static String getFTPConfig() {
        return CONFIG_.getString("ftp_config");
    }

    public static String getFTPHost() {
        return CONFIG_.getString("ftp_host");
    }

    public static String getMaxFileSize() {
        return CONFIG_.getString("up_max_size");
    }

    public static String fileType() {
        return CONFIG_.getString("upload_file_type");
    }

    public static String imgType() {
        return CONFIG_.getString("upload_img_type");
    }

    public static String videoType() {
        return CONFIG_.getString("upload_video");
    }

    public static String mediaType() {
        return CONFIG_.getString("upload_media");
    }

    //======================================================Redis集群=======================================================================
    /**
     * redis cluster
     */

    public static String redisClusterNodes() {
        return CONFIG_.getString("redis.cluster.nodes");
    }

    public static String redisClusterPassword() {
        return CONFIG_.getString("redis.cluster.password");
    }
}
